/* GUI CONVERTED from txedttrl.i (converter v1.76) Sat Apr  6 12:09:17 2002 */
/* txedttrl.i - VALIDATE TRAILER CODES FOR GLOBAL TAX                         */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.14 $                                                          */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 7.4            CREATED: 03/07/96   BY: jzw *H0K0*                */
/* REVISION: 9.0      LAST MODIFIED: 10/01/98   BY: *J2CZ* Reetu Kapoor       */
/* REVISION: 9.0      LAST MODIFIED: 03/13/99   BY: *M0BD* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 10/12/99   BY: *K23N* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KC* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.14 $    BY: Jean Miller          DATE: 04/06/02  ECO: *P055*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/*! &code = trl?_cd
    &amt = trl?_amt
    &desc = description of trailer code (set by this routine)
    &frame = frame containing the trailer codes and amounts
    &loop = block to undo on error
*/

if {&code} <> ""
or {&amt} <> 0 then do:

   for first trl_mstr where trl_code = {&code}
   no-lock: end.

   if available trl_mstr then
      {&desc} = fill(" ",24 - length(trim(trl_desc),"RAW")) + trl_desc.
   else do:
      /* TRAILER CODE NOT DEFINED */
      {pxmsg.i &MSGNUM=124 &ERRORLEVEL=3}
      next-prompt {&code} with frame {&frame}.
      undo {&loop}, retry.
   end.

end.
else
   {&desc} = "".
